//
//  MARequestManager.h
//  MateAdv
//
//  Created by 茶 on 2023/9/8.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

#define ReqManager [MARequestManager shareManager]

@interface MARequestManager : NSObject

@property (nonatomic, copy) NSString *userUUID;

+ (MARequestManager *)shareManager;

- (void)requestBaseInfo;

- (void)fetchUserInfoWithSuccessed:(nullable void (^)(id _Nonnull object))successed failed:(nullable void(^)(NSError * error))failed;

- (void)fetchRuleWithSuccessed:(void (^)(id _Nonnull object))successed failed:(void(^)(NSError * error))failed;

- (void)fetchMealSuccessed:(nullable void (^)(id _Nonnull))successed failed:(nullable void (^)(NSError * _Nonnull))failed;

- (void)loginWithType:(NSUInteger)type params:(nullable NSDictionary *)params successed:(nullable void (^)(id _Nonnull object))successed failed:(nullable void (^)(NSError * _Nonnull error))failed;

- (void)logoutWithSuccessed:(nullable void (^)(id _Nonnull object))successed failed:(nullable void (^)(NSError * _Nonnull error))failed;

- (void)createOrderWithParams:(nullable NSDictionary *)params successed:(nullable void (^)(id _Nonnull object))successed failed:(nullable void (^)(NSError * _Nonnull error))failed;

- (void)payVerifyReceiptnWithParams:(nullable NSDictionary *)params successed:(nullable void (^)(id _Nonnull object))successed failed:(nullable void (^)(NSError * _Nonnull error))failed;

@end

NS_ASSUME_NONNULL_END
